<?php

namespace App\Models\Admin;

use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;

class Content extends Model
{
    use HasFactory;
    protected $table = 'content';
    public $fillable = ['cid', 'title', 'content', 'image', 'status'];

    // 模型关联 1对1
    public function category()
    {
        return $this->hasOne('App\Models\Admin\Category', 'id','cid');
    }
}
